const Koa = require('koa')

// 实例化应用
const app = new Koa()

app.use(async (ctx, next) => {
    await next()
    ctx.body = 1
})

app.use(async (ctx, next) => {
    ctx.body = 2
})

app.listen(8899, () => {
    console.log('listen on 8899');
})